/**
 * Created by Administrator on 2016/10/17.
 */
$(document).scroll(function(){
    var nav=$(".nav-bar");
    var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
    if(scrollTop>=297){
        //alert(1);
        nav.css({
            "background-color":"#23B80C",
            "position": "fixed",
            "top": "0",
            "left": "0",
            "z-index": "9999"})
    }else{
        nav.css({
            "background-image":"-webkit-linear-gradient(#43c317,#01ad00)",
            "position": "relative",
            "z-index": "9999"})
    }
});